Skip to content

fix(friends): Display issue for users with unfetchable test amount; Fixes #8189 (@brentspine)#8190

Open
brentspine wants to merge 2 commits into
monkeytypegame:masterfrom
brentspine:patch-6
Open

fix(friends): Display issue for users with unfetchable test amount; Fixes #8189 (@brentspine)#8190
brentspine wants to merge 2 commits into
monkeytypegame:masterfrom
brentspine:patch-6

Conversation

@brentspine

Copy link
Copy Markdown

Description

Fixes display issue:
image

Checks

  • Check if any open issues are related to this PR; if so, be sure to tag them below.
  • Make sure the PR title follows the Conventional Commits standard. (https://www.conventionalcommits.org for more info)
  • Make sure to include your GitHub username prefixed with @ inside parentheses at the end of the PR title.

Closes #8189

Copilot AI review requested due to automatic review settings July 3, 2026 14:38
@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Jul 3, 2026
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label Jul 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fix friends list “tests” column rendering when a user’s completedTests/startedTests stats are missing, avoiding undefined/x UI.

Changes:

  • Render - for the tests cell when either count is undefined.
  • Skip tooltip metadata when counts are missing (prevents broken aria-label).

Comment thread frontend/src/ts/components/pages/connections/FriendsList.tsx Outdated
Comment thread frontend/src/ts/components/pages/connections/FriendsList.tsx
Comment on lines +729 to +735
restartRatio:
stats.completedTests === 0
? "-"
: (
(stats.startedTests - stats.completedTests) /
stats.completedTests
).toFixed(1),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract to a const to make it more readable

Comment on lines +186 to +188
return completedTests === undefined || startedTests === undefined
? "-"
: `${completedTests}/${startedTests}`;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to this?

return `${completedTests ?? 0}/${startedTests ?? 0}`;

@github-actions github-actions Bot added waiting for update Pull requests or issues that require changes/comments before continuing and removed waiting for review Pull requests that require a review before continuing labels Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff waiting for update Pull requests or issues that require changes/comments before continuing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display issue for users with unfetchable test amount

4 participants